package com.csun.cmny.provider.dao;

import com.csun.cmny.provider.model.domain.OmcMedicRecord;
import com.csun.cmny.provider.model.dto.medic.MedicRecordQueryDto;
import com.csun.cmny.provider.model.vo.MedicRecordVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface OmcMedicRecordMapper extends Mapper<OmcMedicRecord> {

    /**
     * query medic record vo list with page
     *
     * @param medicRecordQueryDto   the medic record query dto
     *
     * @return  the list.
     */
    List<MedicRecordVo> queryListWithPage(MedicRecordQueryDto medicRecordQueryDto);

    /**
     * query medic record list by plan id and begin date
     *
     * @param medicPlanId   the medic plan id
     * @param beginDate     the begin date
     *
     * @return  the list
     */
    List<OmcMedicRecord> queryMedicRecordListByPlanIdAndBeginDate(@Param("medicPlanId") Long medicPlanId,
                                                                  @Param("beginDate") String beginDate);

    /*
     * 根据老人id查询用药异常
     *
     * */
    List<MedicRecordVo> queryOldmanMedicException(@Param("oldmanId") Long oldmanId, @Param("beginDate") String beginDate,@Param("endDate") String endDate);
}